package model

type AdminUser struct {
	Id             int             `json:"id" form:"id" gorm:"PRIMARYKEY;AUTO_INCREMENT"`
	AdminName      string          `json:"admin_name" from:"admin_name" gorm:"column:admin_name;comment:管理员用户名"`
	HeadImg        string          `json:"head_img" from:"head_img" gorm:"column:head_img;comment:头像路径"`
	Sex            string          `json:"sex" from:"sex" gorm:"column:sex;comment:性别"`
	Birthday       string          `json:"birthday" from:"birthday" gorm:"column:birthday;comment:生日"`
	Job            string          `json:"job" from:"job" gorm:"column:job;comment:职位"`
	LoginToken     string          `json:"login_token" from:"login_token" gorm:"column:login_token;comment:管理员登录"`
	BasicData      string          `json:"basic_data" from:"basic_data" gorm:"column:basic_data;comment:基础信息"`
	Authorizations []Authorization `json:"authorizations" gorm:"foreignKey:admin_id;references:id;column:authorizations"`
}

func (AdminUser) TableName() string {
	return "admin_user"
}
